-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API Refactor: Transaction #224
Conversation
@@ -59,6 +61,15 @@ export default class App { | |||
return this.organization.connection.orgConnector | |||
} | |||
|
|||
interface(): ethers.utils.Interface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A helper to access an Ethers interface object from the app entities.
if (!app) { | ||
throw new Error(`Could not create transaction due to missing app artifact`) | ||
} | ||
const appInterface = app.interface() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We refactor the logic to use Ethers interface directly instead of having the old logic to search for the methodAbiFragment
manually.
): Promise<Transaction> { | ||
let transactionOptions = {} | ||
|
||
// If an extra parameter has been provided, it is the transaction options if it is an object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't longer need to support the transaction options as overrides as we did on aragonAPI. Now, this is the responsibility of the users of Connect when they sign the transaction we provide.
spender: forwarderAddress, // since it's a forwarding transaction, always show the real spender | ||
value: feeDetails.amount.toString(), | ||
}, | ||
const tokenData: TokenData = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We no longer pass the Token details as part of the transaction object instead we provide a new object.
@@ -1,76 +1,76 @@ | |||
import { ethers } from 'ethers' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To prevent errors with types I decided to comment the logic related to the Forwarding Path descriptions.
Codecov Report
@@ Coverage Diff @@
## update-types #224 +/- ##
================================================
+ Coverage 34.72% 35.96% +1.24%
================================================
Files 99 97 -2
Lines 1823 1760 -63
Branches 291 277 -14
================================================
Hits 633 633
+ Misses 1190 1127 -63
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Closes #220
Builds on #223